package clock;
/**
 * Time class to provide the clock beats for the timer
 */
import java.awt.*;
import javax.swing.Timer;
import java.awt.event.ActionListener;
import java.awt.event.*;

public class Time {

  int delay=1000;
  private ActionListener listenerList = null;

  public synchronized void addActionListener(ActionListener l) {
  	listenerList = AWTEventMulticaster.add(l, listenerList);
  }

  /*void timer_actionPerformed(ActionEvent e) {
    if (listenerList != null)
      listenerList.actionPerformed(e);
  }*/

  Timer timer=  new Timer(delay, 
  		            new ActionListener() {
  			          public void actionPerformed(ActionEvent e) {
  			          	if (listenerList != null)
  			          		listenerList.actionPerformed(e);
  			            }
  					});
  {
    timer.start();
  }

}